<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--@elvariable id="actionBean" type="com.depo.quiggle.view.controller.QglLogPendingAction"--%>
<%@ include file="/WEB-INF/jsp/include/taglibs.jsp" %>
<script type="text/javascript" src=" ${pageContext.request.contextPath}/js/rateTableForQGL.js" >
 	</script>
<script type="text/javascript">
        var agencies = [

            <c:forEach items="${actionBean.agencies}" var="agency" varStatus="agencyStatus">
          
            {
                value:"${agency.userId} ${agency.initials} ${agency.firstName} ${agency.lastName}",
                id: "${agency.userId}",
                initial: "${agency.initials}",
                firstName: "${agency.firstName}",
                lastName: "${agency.lastName}"
            }<c:if test="${!agencyStatus.last}">,</c:if>
            </c:forEach>
        ];
        var proofers = [

            <c:forEach items="${actionBean.proofers}" var="proofer" varStatus="prooferStatus">
            {
                value:"${proofer.userId} ${proofer.initials} ${proofer.firstName} ${proofer.lastName}",
                id: "${proofer.userId}",
                initial: "${proofer.initials}",
                firstName: "${proofer.firstName}",
                lastName: "${proofer.lastName}"
            }<c:if test="${!prooferStatus.last}">,</c:if>

            </c:forEach>
        ];

        var scopists = [

            <c:forEach items="${actionBean.scopists}" var="scopist" varStatus="scopistStatus">
            {
                value:"${scopist.userId} ${scopist.initials} ${scopist.firstName} ${scopist.lastName}",
                id: "${scopist.userId}",
                initial: "${scopist.initials}",
                firstName: "${scopist.firstName}",
                lastName: "${scopist.lastName}"
            }<c:if test="${!scopistStatus.last}">,</c:if>
            </c:forEach>
        ];

      	$(document).ready(function(){
        	var totalCount = ${actionBean.jobCount};
            var pageNumber = ${actionBean.offset}+1;
            
            if(totalCount > 20 )
        	  displayPagination(pageNumber,totalCount);
        });
       
        function displayPagination(selectedPage,totalCnt){

        	  var noOfPages = Math.ceil(totalCnt/20);
        	  var selectedPageNumber = 1 ;
        	  if(selectedPage !='')
        		  selectedPageNumber = selectedPage;

        		$(function() {			
        				
        				$("#paginationDiv").paginate({
        					count 		: noOfPages,
        					start 		: selectedPageNumber,
        					display     : 10,
        					border					: false,
        					text_color  			: '#888',
        					background_color    	: '#EEE',	
        					text_hover_color  		: 'black',
        					background_hover_color	: '#CFCFCF'
        				});
        		   });
        	}

</script>



<link rel="stylesheet" media="all" type="text/css" href="${pageContext.request.contextPath}/css/jquery/overcast/jquery-ui-1.8.21.custom.css" />


<%--<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-1.7.2.min.js"></script>--%>
<%--<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-ui-1.8.21.custom.min.js"></script>--%>


<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/qgl-log-pending.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/pagination.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.paginate.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/qgl-log-pending.js"></script>